package com.boarsoft.boar.demo.order.entity;

import java.io.Serializable;

import com.boarsoft.dao.sharding.bean.HashedEntity;

public class PocOrder implements HashedEntity, Serializable {
	private static final long serialVersionUID = -1675214389365837430L;

	public static final short STATUS_PLACE = 0;
	public static final short STATUS_CANCEL = 9;
	public static final short STATUS_FINISH = 1;

	private int orderId;
	private int tenantId;
	private int userId;
	private int productId;
	private int amount;
	private int productNum;
	private short status;
	private String createTime;
	private String modifyTime;
	
	/** 是否需要稽查轨迹 */
	private boolean trace = true;

	public PocOrder() {
	}

	public PocOrder(int orderId, int tenantId, int userId, int productId, int amount, int productNum, short status,
			String createTime, String modifyTime) {
		this.orderId = orderId;
		this.tenantId = tenantId;
		this.userId = userId;
		this.productId = productId;
		this.amount = amount;
		this.productNum = productNum;
		this.status = status;
		this.createTime = createTime;
		this.modifyTime = modifyTime;
	}

	@Override
	public int hash() {
		return tenantId;
	}

	@Override
	public String toString() {
		return new StringBuilder()//
				.append("{ \"orderId\": ").append(orderId)//
				.append(", \"tenantId\": ").append(tenantId)//
				.append(", \"userId\": ").append(userId)//
				.append(", \"productId\": ").append(productId)//
				.append(", \"amount\": ").append(amount)//
				.append(", \"productNum\": ").append(productNum)//
				.append(", \"status\": ").append(status)//
				.append(", \"createTime\": \"").append(createTime)//
				.append("\", \"modifyTime\": \"").append(modifyTime)//
				.append("\" }").toString();
	}

	public int getOrderId() {
		return this.orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	public int getTenantId() {
		return this.tenantId;
	}

	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	public int getUserId() {
		return this.userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getProductId() {
		return this.productId;
	}

	public void setProductId(int productId) {
		this.productId = productId;
	}

	public int getAmount() {
		return this.amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public int getProductNum() {
		return this.productNum;
	}

	public void setProductNum(int productNum) {
		this.productNum = productNum;
	}

	public short getStatus() {
		return this.status;
	}

	public void setStatus(short status) {
		this.status = status;
	}

	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	public boolean isTrace() {
		return trace;
	}
}